home *** CD-ROM | disk | FTP | other *** search
- /* $VER: ScanImage.rexx 1.1 by Jochen Grus (02.09.96) */
-
- OPTIONS RESULTS
-
- ADDRESS 'rexx_TVPaint'
-
- options failat 25 /* ScanToDisk returns 0 or 20 */
-
-
- ram:1
- tv_request 'Wollen Sie ein Bild einscannen ?'
- a=result
- if a=0 then tv_warn "Naja, dann machen wir trotzdem so weiter. (Kicher)"
- if a=1 then
- ok=1
- call SCAN() /* Scans the image into a temporary file */
- call IMPORTGRAPHIC() /* Loads Image into TVPaint */
- call DELETEFILE() /* Removes temporary image file */
-
- EXIT
-
-
-
- SCAN:
- /* Scans the image into a temporary file using the program "ScanToDisk". */
- if not 1=open('path','ENV:ScanQuix/Path','READ') then do
- ok=0
- return
- end
-
- pragma('DIRECTORY',READLN('path'))
- address command 'ScanQuix3/ScanToDisk ram:1 TRUECOLOR NOICONS NOGUI PUBSCREEN=TVPaint' /* Pubscreen doesn`t work */
- if RC>=5 then do
- ok=0
- return
- end
-
- return
-
-
-
- IMPORTGRAPHIC:
- /* Loads the image into TVPaint */
- if ok=0 then
- return
-
- 'TV_loadpic ram:1'
-
- return
-
-
-
- DELETEFILE:
- /* removes temporary file */
- address command 'delete ram:1'
-
-
- return
-